package entity;

// Generated 2016-8-10 9:51:13 by Hibernate Tools 4.0.0

import java.util.Date;
import java.util.List;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.OneToMany;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

import org.hibernate.annotations.DynamicUpdate;

/**
 * PsRole generated by hbm2java
 */
@Entity
@Table(name="ps_role")
@DynamicUpdate(true)
public class PsRole implements java.io.Serializable {
	@Id
	@Column(name="id")
	private String id;
	@Column(name="rolename")
	private String rolename;
	@Column(name="creationtime")
	private Date creationtime;
	@Column(name="createdby")
	private String createdby;
	@Column(name="lastupdatetime")
	private Date lastupdatetime;
	@Column(name="isstart")
	private Byte isstart;
	@OneToMany
	@JoinColumn(name="roleId")
	private List<PsRolePermission> permissions;
	
	
	
	public List<PsRolePermission> getPermissions() {
		return permissions;
	}

	public void setPermissions(List<PsRolePermission> permissions) {
		this.permissions = permissions;
	}

	public PsRole() {
	}

	public PsRole(String id, String rolename) {
		this.id = id;
		this.rolename = rolename;
	}

	public PsRole(String id, String rolename, Date creationtime,
			String createdby, Date lastupdatetime, Byte isstart) {
		this.id = id;
		this.rolename = rolename;
		this.creationtime = creationtime;
		this.createdby = createdby;
		this.lastupdatetime = lastupdatetime;
		this.isstart = isstart;
	}

	public String getId() {
		return this.id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getRolename() {
		return this.rolename;
	}

	public void setRolename(String rolename) {
		this.rolename = rolename;
	}

	public Date getCreationtime() {
		return this.creationtime;
	}

	public void setCreationtime(Date creationtime) {
		this.creationtime = creationtime;
	}

	public String getCreatedby() {
		return this.createdby;
	}

	public void setCreatedby(String createdby) {
		this.createdby = createdby;
	}

	public Date getLastupdatetime() {
		return this.lastupdatetime;
	}

	public void setLastupdatetime(Date lastupdatetime) {
		this.lastupdatetime = lastupdatetime;
	}

	public Byte getIsstart() {
		return this.isstart;
	}

	public void setIsstart(Byte isstart) {
		this.isstart = isstart;
	}

}
